Skip to content

chore: standardize worktree location on .claude/worktrees/#201

Merged
mikestankavich merged 1 commit into
mainfrom
docs/worktree-convention-alignment
May 30, 2026
Merged

chore: standardize worktree location on .claude/worktrees/#201
mikestankavich merged 1 commit into
mainfrom
docs/worktree-convention-alignment

Conversation

@mikestankavich

Copy link
Copy Markdown
Contributor

What

Settle the recurring "where do worktrees go?" confusion by aligning every signal on the one path Claude Code's native worktree tool actually writes to: .claude/worktrees/.

Why

The native EnterWorktree tool is hardcoded to create worktrees under .claude/worktrees/ and exposes no location knob (only worktree.baseRef). But the repo's signals pointed elsewhere:

Signal Was Problem
.gitignore ignored root .worktrees/ a dir the native tool never uses
stray empty dir .worktrees/ at root leftover; the superpowers skill's Step 1b fallback would pick it up
actual worktrees landed in .claude/worktrees/ not gitignored → recurring ?? .claude/ noise in git status

The superpowers using-git-worktrees skill defaults to .worktrees/ only as a no-native-tool fallback — which never fires in this harness because the native tool always exists. So matching the tool is correct.

Changes

  • .gitignore: ignore .claude/worktrees/ (narrow — the rest of .claude/ stays tracked, per the standing decision not to ignore all of .claude/) instead of the unused .worktrees/.
  • CLAUDE.md: add a ## Worktrees section declaring .claude/worktrees/ canonical across all trakrf repos — the highest-priority signal the skill checks, so future agents have no ambiguity.
  • Removed the stray empty root .worktrees/ dir (filesystem cleanup, was gitignored).

Cross-repo consistency

The platform agent concurs (​.claude/worktrees/ is cleaner; the .worktrees/-via-symlink bridge is a footgun) and will migrate platform to match — pending Mike's direct confirmation of the convention change.

🤖 Generated with Claude Code

Align all worktree signals on the path Claude Code's native EnterWorktree
tool actually writes to. Previously .gitignore ignored a root-level
.worktrees/ that the native tool never used, while worktrees landed in the
non-ignored .claude/worktrees/ — producing recurring confusion and stray
untracked .claude/ noise.

- .gitignore: ignore .claude/worktrees/ (narrow — rest of .claude/ stays
  tracked) instead of the unused .worktrees/
- CLAUDE.md: declare .claude/worktrees/ as the canonical, cross-repo
  worktree location so the highest-priority signal is unambiguous

Cross-repo: platform agent concurs; platform migrates from its
.worktrees/-via-symlink bridge to match, pending Mike's direct confirmation.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 30, 2026

Copy link
Copy Markdown

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e7a4e89
Status: ✅  Deploy successful!
Preview URL: https://42a4baec.docs-4n7.pages.dev
Branch Preview URL: https://preview.docs-4n7.pages.dev

View logs

@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://docs.preview.trakrf.id

@mikestankavich mikestankavich merged commit 532d636 into main May 30, 2026
2 checks passed
@mikestankavich mikestankavich deleted the docs/worktree-convention-alignment branch May 30, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant